package oa.hleast.xswl.service.banner;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import oa.hleast.xswl.pojo.domain.banner.CmsWebsiteBanner;
import oa.hleast.xswl.pojo.form.banner.CmsWebsiteBannerForm;
import oa.hleast.xswl.pojo.vo.web.CmsWebsiteBannerVo;
import oa.hleast.xswl.pojo.vo.web.HomePageWebsiteBannerVo;

import java.util.List;

public interface IWebsiteBannerService extends IService<CmsWebsiteBanner> {
    /**
     * 启动页 带缓存
     *
     * @return
     */
    HomePageWebsiteBannerVo getStartUpData();

    /**
     * 首页轮播图 带缓存
     *
     * @param page  当前页
     * @param limit 每页条数
     */
    Page<HomePageWebsiteBannerVo> getHomePageWebsiteBanner(Integer page, Integer limit);

    Page<HomePageWebsiteBannerVo> getHomePageServerWebsiteBanner(Integer page, Integer limit);

    Page<HomePageWebsiteBannerVo> getHomePageMallWebsiteBanner(Integer page, Integer limit);

    boolean add(CmsWebsiteBannerForm websiteBannerFrom);

    boolean update(CmsWebsiteBannerForm websiteBannerFrom);

    Page<CmsWebsiteBannerVo> pageList(Integer page, Integer limit, String title, Integer reviewStatus, Long dictPositionTypeId);

    boolean deleteByIds(List<String> asList);

    boolean invalid(String id);

    CmsWebsiteBannerVo detail(Integer id);

    /**
     * 根据configKey获取轮播图
     *
     * @param configKey 通用配置key
     */
    Page<HomePageWebsiteBannerVo> getWebsiteBannerPageByKey(Integer page, Integer limit, String configKey);

    Page<HomePageWebsiteBannerVo> getWuchengWebsiteBannerPage(Integer page, Integer limit);
}
